<template>
    <div class="app-container home">
        <div v-for="item in questionList" :key="item.ID">
            <div v-for="(data, key) in item" :key="key">{{ key }}问题</div>
            <div style="margin-top: 10px">
                <van-collapse v-model="activeName" accordion>
                    <van-collapse-item v-for="item1 in data" :key="item1.ID" :title="item1.QUESTION" name="1"></van-collapse-item>
                </van-collapse>
            </div>
        </div>

        <empty v-if="!questionList.length"></empty>
        <div style="text-align: center; font-size: 16px; padding-top: 20px; color: #c8c9cc">暂无问题</div>
    </div>
</template>

<script setup name="problemTypeList">
import { findByType } from '../../api/wallet'
import store from '@/store/index.js'
const route = useRoute()
const activeName = ref('')
const questionList = ref({ list: [] })
const question = () => {
    findByType({ currentPage: 1, questionType: route.query.type, agencySource: store.state.user.userInfo.agentBean.agencySource }).then(res => {
        const { code, message, object } = res
        questionList.value = object
        console.log(questionList.value)
    })
}
question()
</script>

<style scoped lang="scss">
.app-container {
    padding: 10px;

    .title {
        font-size: 16px;
        font-family: SimHei;
        font-weight: 400;
        color: #000000;
        opacity: 1;
    }

    .content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;

        .item {
            width: 32%;
            height: 96px;
            background: #ffffff;
            margin-top: 10px;
            opacity: 1;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;

            img {
                height: 26px;
                width: 26px;
            }

            .tt {
                font-size: 12px;
                font-family: SimHei;
                font-weight: 400;
                color: #000000;
                margin-top: 10px;
                opacity: 1;
            }
        }
    }
}
</style>

